SQL Query
The SQL Query algorithm allows you to manipulate data in an existing schema using specific SQL syntax. You can examine the expression prior to running it.
An SQL Query step allows you to select, insert, update and/or delete data from the Schema using any valid SQL syntax. The results of the step will completely replace the previous data stored in the Schema. This means that if you want to insert a row into the current Schema, you first need to define an Insert statement, and then define another Select statement on the entire Schema table.
Note: The SQL expression must contain a Select statement.
Warning: Remember to map the query results to the Schema columns, otherwise you will not see anything in the Schema.
The Manipulate Schema Step: SQL Query page is illustrated in the figure below (note the presence of a Select statement):

Manipulate Step: SQL Query
The result of the query listed in the example can be seen in the following figure:

On the left, you can find the query result with one new column named "User".
To configure this manipulate step, follow the instructions below:
- In the Admin Navigation tree, select Interfaces > InterfaceName > Tasks > TaskName > Steps.
- On the toolbar, click New >New Manipulate Step.
Creating a New Manipulate Step
- Navigate to the Manipulate Schema section and select SQL Query.

Manipulate Schema Section
- In the SQL Query work area, fill in the following fields:
Fields | Description |
---|---|
Name |
Provide a distinctive name for this step. |
Is Active |
Select the check box to engage the scheduler for this step. |
Order of Execution |
Enter the order in which this step should be executed. |
Filter Expression |
Optional. Use this filed to filter data from the source database prior to inserting it into the Schema table. |
Sort Expression |
Optional. Use this field to sort data from the source database prior to inserting it into the Schema table. |
Stop interface execution if query failed |
Optional. If enabled, the system will stop any data manipulation if the query returns an error. |
SQL |
Enter the SQL query to perform the data manipulation within a schema. For details on SQL syntax, refer to this page. |
- Click the Save button.